﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using System.Xml;

namespace GameVLTK
{
    public class Skill : VisibleGameEntity
    {
        private ContentManager Content;
        private string Path;
        private int _nTextures;

        public int nTextures
        {
          get { return _nTextures; }
          set { 
              _nTextures = value; 
              _nFrames= 
          }
        }

        private int _nFrames;

        public int nFrames
        {
            get { return _nFrames; }
            set { _nFrames = value; }
        }

        /// <summary>
        /// Khởi tạo thông tin của vật phẩm
        /// </summary>
        public Skill(ContentManager content, string path, int nTextures)
        {
            //
            this.Content = content;
            this.Path = path;
            this._nTextures = nTextures;
            //


            Texture2D[] textures;
            textures = new Texture2D[nTextures];

            int[] framSeq = new int[nTextures];
            for (int i = 0; i < nTextures; i++)
            {
                textures[i] = content.Load<Texture2D>(path + (i + 1).ToString("00"));
                framSeq[i] = i;
            }

            //Mỗi obj sẽ có một sprite gồm dãy các hình
            this.Sprites = new List<MySprite>();
            this.nSprites = 1;
           
            
            //Khởi tạo sprite cho obj
            MySprite mySprite = new MySprite(textures, new Vector2(0,0));
            

            this.Sprites.Add(mySprite);
        }
    }
}
